package reentrantlock;

public class Child extends Father {

    @Override
    public synchronized void doSomething() {
        System.out.println(Thread.currentThread().getName() + ": " + "Child is doing something.");
        doAnotherThing();
    }

    public synchronized void doAnotherThing() {
        super.doSomething();
        System.out.println(Thread.currentThread().getName() + ": " + "Child is doing another thing.");
    }
}
